home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / initramfs-tools / hooks / thermal < prev    next >
Encoding:
Text File  |  2010-12-06  |  1.2 KB  |  69 lines

  1. #!/bin/sh
  2.  
  3. PREREQ=""
  4.  
  5. prereqs()
  6. {
  7.     echo "$PREREQ"
  8. }
  9.  
  10. case $1 in
  11. # get pre-requisites
  12. prereqs)
  13.     prereqs
  14.     exit 0
  15.     ;;
  16. esac
  17.  
  18. # Hooks for loading thermal bits into the initramfs
  19.  
  20. . /usr/share/initramfs-tools/hook-functions
  21.  
  22. case "$DPKG_ARCH" in
  23. # copy the right modules
  24. powerpc|ppc64)
  25.  
  26.     # Only G5 Mac machines need to load
  27.     # therm_pm72 or one of the windfarm_pm* modules.
  28.  
  29.     [ -r /proc/cpuinfo ] || exit 0
  30.  
  31.     MODEL="`grep model /proc/cpuinfo`"
  32.     MODEL="${MODEL##*: }"
  33.  
  34.     case "$MODEL" in
  35.       RackMac3,1|PowerMac7,2|PowerMac7,3)
  36.         force_load therm_pm72
  37.         ;;
  38.       PowerMac8,1|PowerMac8,2)
  39.         force_load windfarm_pm81
  40.         ;;
  41.       PowerMac9,1)
  42.         force_load windfarm_pm91
  43.         ;;
  44.       PowerMac11,2)
  45.         force_load windfarm_pm112
  46.         ;;
  47.       PowerMac12,1)
  48.         force_load windfarm_pm121
  49.         ;;
  50.       *)
  51.         # No other machine needs windfarm_* modules on initrd.
  52.         exit 0
  53.         ;;
  54.     esac
  55.     manual_add_modules windfarm_core
  56.     manual_add_modules windfarm_cpufreq_clamp
  57.     manual_add_modules windfarm_lm75_sensor
  58.     manual_add_modules windfarm_max6690_sensor
  59.     manual_add_modules windfarm_pid
  60.     manual_add_modules windfarm_smu_controls
  61.     manual_add_modules windfarm_smu_sat
  62.     manual_add_modules windfarm_smu_sensors
  63.     ;;
  64. i386|amd64|ia64)
  65.     manual_add_modules fan
  66.     manual_add_modules thermal
  67.     ;;
  68. esac
  69.